<div class="panel panel-default panel-intro">
    <div class="panel-heading">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#t-all" data-toggle="tab">{:__('All')}</a></li>
            <li><a href="#t-pending" data-toggle="tab">待审核</a></li>
            <li><a href="#t-approved" data-toggle="tab">已审核</a></li>
            <li><a href="#t-purchased" data-toggle="tab">已采购</a></li>
        </ul>
    </div>
    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="t-all">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        <a class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>
                        <a class="btn btn-success btn-add" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a>
                        <a class="btn btn-success btn-edit btn-disabled disabled" title="{:__('Edit')}" ><i class="fa fa-pencil"></i> {:__('Edit')}</a>
                        <a class="btn btn-danger btn-del btn-disabled disabled" title="{:__('Delete')}" ><i class="fa fa-trash"></i> {:__('Delete')}</a>
                        <a class="btn btn-info btn-approve btn-disabled disabled" title="批量审核"><i class="fa fa-check"></i> 批量审核</a>
                        <a class="btn btn-warning" href="{:url('generateFromShortage')}" title="从缺货物料生成"><i class="fa fa-shopping-cart"></i> 从缺货物料生成</a>
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('scanwork/purchase_request/edit')}"
                           data-operate-del="{:$auth->check('scanwork/purchase_request/del')}"
                           width="100%">
                    </table>
                </div>
            </div>
            <div class="tab-pane fade" id="t-pending">
                <div class="alert alert-info">
                    <h4><i class="icon fa fa-info"></i> 待审核采购申请</h4>
                    以下采购申请等待审核：
                </div>
                <div id="pending-table"></div>
            </div>
            <div class="tab-pane fade" id="t-approved">
                <div class="alert alert-success">
                    <h4><i class="icon fa fa-check"></i> 已审核采购申请</h4>
                    以下采购申请已通过审核：
                </div>
                <div id="approved-table"></div>
            </div>
            <div class="tab-pane fade" id="t-purchased">
                <div class="alert alert-success">
                    <h4><i class="icon fa fa-shopping-cart"></i> 已采购申请</h4>
                    以下采购申请已完成采购：
                </div>
                <div id="purchased-table"></div>
            </div>
        </div>
    </div>
</div>
